package com.lightsaber.trade.as.entity.reta;


import com.lightsaber.trade.core.entity.BaseEntity;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Version;

		/**
 * OrderTemplate.
 */
@Entity
@Table(name="reta_order_template"
)
public class OrderTemplate  extends BaseEntity {
	

		
		
    @Version
    @Column(name="version")
		 	private Integer version;
		
		
		
		
		
    
    @Column(name="description", length=100)
		 	private String description;
		
    
    @Column(name="name", length=20)
		 	private String name;
		
    
    @Column(name="total_price", precision=22, scale=0)
		 	private Double totalPrice;
		
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="orderTemplate")
		 	private Set<Order> orders = new HashSet<Order>(0);
		
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="orderTemplate")
		 	private Set<OrderTemplateItem> orderTemplateItems = new HashSet<OrderTemplateItem>(0);
		   
    
    
			
    public Integer getVersion() {
        return this.version;
    }
    
    public void setVersion(Integer version) {
        this.version = version;
    }
    
    
    
    
    
    
			
    public String getDescription() {
        return this.description;
    }
    
    public void setDescription(String description) {
        this.description = description;
    }
    
    
			
    public String getName() {
        return this.name;
    }
    
    public void setName(String name) {
        this.name = name;
    }
    
    
			
    public Double getTotalPrice() {
        return this.totalPrice;
    }
    
    public void setTotalPrice(Double totalPrice) {
        this.totalPrice = totalPrice;
    }
    
    
			
    public Set<Order> getOrders() {
        return this.orders;
    }
    
    public void setOrders(Set<Order> orders) {
        this.orders = orders;
    }
    
    
			
    public Set<OrderTemplateItem> getOrderTemplateItems() {
        return this.orderTemplateItems;
    }
    
    public void setOrderTemplateItems(Set<OrderTemplateItem> orderTemplateItems) {
        this.orderTemplateItems = orderTemplateItems;
    }
    
	}


